package dex.micros_gdc

import java.util.Date;

class Testcase {

	String projectName
	Date receivedDate
	String activityNumber
	String status
	Date dueDate
	String testcaseStatus
	String comments
	String delivered

	static constraints = {
		projectName(blank:false, nullable: false)
		activityNumber(blank:false, nullable: false)
		receivedDate(blank:false, nullable: false)
		status(nullable:true)
		dueDate(blank:false, nullable: false)
		testcaseStatus(blank:false, nullable:true, inList: [
			"Approved",
			"In Progress",
			"Pending Approval"
		])
		comments(nullable:true)
		delivered(blank:false, nullable:false, inList: ["N", "Y"])
    }

	static mapping = {
		table 'mgtm_testcase'

		id(generator: 'assigned', column: 'task_id', type: 'long')

		projectName(column: 'project_name')
		receivedDate(column:'received_date', type: 'date')
		activityNumber(column: 'activity_number')
		status(column:'status')
		dueDate(column:'due_date', type: 'date')
		testcaseStatus(column:'testcase_status')
		comments(column: 'comments')
		delivered(column:'delivered')

		version true
	}
}
